#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
    int n, i, j;
    while (1) {
        printf("size:");
        scanf("%d", &n);
        if (n <= 0) {
            printf("Bye!\n");
            break;
        }
        for (i = 1; i <= n; i++)
        {
            for (j = 1; j <= n - i; j++)
            {
                printf(" ");
            }
            for (j = 1; j <= 2 * i - 1; j++)
            {
                if (j == 1 || j == 2 * i - 1)
                    printf("*");
                else
                    printf(" ");
            }
            printf("\n");
        }
        for (i = 2; i <= n; i++)
        {
            for (j = 1; j <= i - 1; j++)
            {
                printf(" ");
            }
            for (j = 1; j <= 2 * (n - i) + 1; j++)
            {
                if (j == 1 || j == 2 * (n - i) + 1)
                    printf("*");
                else
                    printf(" ");
            }
            printf("\n");
        }
    }
    return 0;
}
